package weifei.live.simulation.im;

// import jakarta.jms.ConnectionFactory;
// import jakarta.jms.Queue;
// import org.apache.activemq.ActiveMQConnectionFactory;
// import org.apache.activemq.command.ActiveMQQueue;
// import org.springframework.beans.factory.annotation.Value;
// import org.springframework.context.annotation.Bean;
// import org.springframework.context.annotation.Configuration;
// import org.springframework.jms.config.JmsListenerContainerFactory;
// import org.springframework.jms.config.SimpleJmsListenerContainerFactory;


// @Configuration
public class MQConfig
{
    // @Value("${spring.activemq.broker-url}")
    // private String brokerUrl;

    // @Value("${spring.activemq.user}")
    // private String userName;

    // @Value("${spring.activemq.password}")
    // private String password;


    // @Bean
    // public ConnectionFactory connectionFactory() {
    //     return new ActiveMQConnectionFactory(
    //         this.userName,
    //         this.password,
    //         this.brokerUrl
    //     );
    // }


    // // 在Queue模式中，对消息的监听需要对containerFactory进行配置
    // @Bean("queueListener")
    // public JmsListenerContainerFactory<?> queueJmsListenerContainerFactory(ConnectionFactory connectionFactory){
    //     SimpleJmsListenerContainerFactory factory = new SimpleJmsListenerContainerFactory();
    //     factory.setConnectionFactory(connectionFactory);
    //     factory.setPubSubDomain(false);
    //     return factory;
    // }




    // @Bean("friendMessageCacheQueue1")
    // public Queue friendMessageCacheQueue1() { return new ActiveMQQueue(IMQueue.FriendMessageCacheQueue1.getDestinationName()); }

    // @Bean("userAdminerMessageCacheQueue1")
    // public Queue userAdminerMessageCacheQueue1() { return new ActiveMQQueue(IMQueue.UserAdminerMessageCacheQueue1.getDestinationName()); }

}





